<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<tr:document xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:tr="http://myfaces.apache.org/trinidad"
             xmlns:mias="http://www.monsters.inc/mias"
             xmlns:c="http://java.sun.com/jstl/core">

<ui:composition template="templates/template.xhtml">
  <!--
       This page contains an edit form for editing a Kid's properties.
  -->
  <ui:define name="title">Edit kid</ui:define>
  <ui:define name="content"> 
    <tr:panelFormLayout>
      <tr:group> 
        <mias:field id="firstName" bean="#{editScaredForm.editKidController.selectedKid}" required="true" readOnly="true"/>
        <mias:field id="lastName" bean="#{editScaredForm.editKidController.selectedKid}"  required="true" readOnly="true"/>
      </tr:group> 
      <tr:group> 
          <mias:dateField id="lastScared" bean="#{editScaredForm.editKidController.selectedKid}"/>
          <mias:selectField id="employee" bean="#{editScaredForm.editKidController.selectedKid}" 
                            type="choice" items="#{empsTable.employees}" 
                            itemValue="id" itemLabel="name" />
        </tr:group>  
        
        <f:facet name="footer">
          <tr:panelButtonBar halign="right">
            <!--tr:commandButton text="#{msg.apply}" id="btnApply" partialSubmit="true" action="apply"
                              actionListener="#{kidsTable.saveSelected}"/-->
            <tr:commandButton text="#{msg.ok}" action="ok"
                              actionListener="#{editScaredForm.editKidController.updateScareData}"/>
            <tr:commandButton text="#{msg.cancel}" action="cancel" immediate="true" />
          </tr:panelButtonBar>
        </f:facet>
      </tr:panelFormLayout> 
  </ui:define>
</ui:composition>

</tr:document>